import log from '@dfeidao/atom-nodejs/logger/log';
import { IncomingHttpHeaders } from 'http';
import complex_query from '@dfeidao/atom-nodejs/db/complex-query';
import { systemid } from '../../atom/config';
interface Message {

}

// interface IWebResult {
// 	data: unknown;
// 	cookie?: {
// 		[name: string]: string;
// 	} | null;
// 	content_type?: string;
// 	headers?: {
// 		[key: string]: string[];
// 	};
// 	attachment?: string;
// 	redirect?: string;
// 	status_code?: number;
// }

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {
	const xx = complex_query(action_id, session_id, systemid);
	const p = await xx
		.add_field('plan_classify', 'plan_cla_attr_no', 'plan_cla_attr_no')
		.add_field('plan_classify', 'plan_cla_attr_name', 'plan_cla_attr_name')
		.where_not_null('plan_classify', 'plan_cla_attr_name')
		.exec();
	return {
		p
	};
}
